﻿@model CoreHome.Admin.Models.FormLink

<form id="@Model.Id" action="@Model.Href" method="post" asp-antiforgery="true" hidden>
    @foreach (var para in Model.Paras)
    {
        <input name="@para.Key" value="@para.Value"/>
    }
</form>

<a href="javascript:void(0)" class="@Model.ClassName" data-toggle="modal" data-target="#@Model.ModalId">@Model.Text</a>

<div class="modal fade" id="@Model.ModalId" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel">@Model.Warning</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body text-center">
                <button type="button" class="btn btn-danger" data-dismiss="modal">No</button>
                <button type="button" class="btn btn-success" onclick="document.getElementById('@Model.Id').submit()">Yes</button>
            </div>
        </div>
    </div>
</div>